﻿
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="${pageContext.request.contextPath }/css/admin.css"
	rel="stylesheet" />
<script
	src="${pageContext.request.contextPath }/script/jquery-1.10.2.js"></script>
<script src="${pageContext.request.contextPath }/ckeditor/ckeditor.js"></script>
<script>
	
</script>
</head>
<body>
	<div id="page">
		<div id="header">
			<div id="corpTitle">美食前线后台</div>
			<div id="rightTitle">新闻管理</div>
		</div>
		<div id="main">
			<div id="nav">
				<div class="menu">
					<ul>
						<li>类别管理</li>
						<li>美食管理</li>
						<li>新闻管理</li>
						<li>留言管理</li>
						<li>用户管理</li>
					</ul>
				</div>
			</div>
			<div id="container">

				<form action="NewsServlet" method="get">
					新闻标题： <input type="text" name="search" />
					<button type="submit">查询</button>
					<a href="${pageContext.request.contextPath }/admin/newsEdit.jsp">添加新闻</a>
				</form>
				<hr />

				<form action="NewsListServlet" method="get">
					<table class="data-list">
						<tr>
							<th>新闻标题</th>
							<th>发表时间</th>
							<th>操作</th>
						</tr>
						<c:forEach var="news" items="${newslist }">
							<tr>
								<td>${news.title }</td>
								<td>${news.publishdate }</td>
								<td>
								<a href="${pageContext.request.contextPath }/NewsEditServlet?nid=${news.id}">编辑</a>
								<a href="${pageContext.request.contextPath }/NewsListServlet?nid=${news.id}">删除</a>
								</td>
							</tr>
						</c:forEach>
					</table>
				</form>
			</div>
			<div class="clear"></div>
		</div>
		<div id="footer">
			<p>
				<a>首页|</a><a>关于我们|</a><a>联系我们</a>
			</p>
			<p>@©2016 网站样板-餐饮 版权所有</p>
			<p>技术支持：广州广力 | 手机版 | 管理登录</p>
		</div>
	</div>
</body>
</html>
